<?php if (!defined("_ECRIRE_INC_VERSION")) return;
    function formulaires_alohacart_cart_order_verifier_dist(){    
	$erreurs = array();
    
    // check that mandatory fields are indeed filled out:
    $mand_fields = array('name', 'tel', 'email'); 
	foreach($mand_fields as $obligatoire)
		if (!_request($obligatoire)) $erreurs[$obligatoire] = _T('alohacart:obligatory_field');
		
	// check that any entered email address is correctly formatted:
	
    include_spip('inc/filtres');
	if (_request('email') AND !email_valide(_request('email')))
		$erreurs['email'] = _T('alohacart:wrong_email');	
     
    if ($erreurs)
        $erreurs['message_erreur'] = _T('alohacart:form_error');
    
	return $erreurs;
}
?>